```html
<script setup lang="ts">
  import { ref, computed } from "vue"

  const checkedRef = ref(false)

  const service = useMachine(
    checkbox.machine,
    computed(() => ({
      checked: checkedRef.value,
      onCheckedChange(details) {
        checkedRef.value = details.checked
      },
    })),
  )
</script>
```
